<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">


<h:head></h:head>
 
<h:form id="form">
	<p:growl id="mensajes" showDetail="true" life="2000" sticky="true" autoUpdate="true"/>
		<p:growl id="messages" showDetail="true"/>  
    		<h:panelGrid columns="2" cellpadding="5">  
  			<h:outputText value="Valorar contenido digital: " />  
        	<p:rating value="#{ventaBean.rating}" required="true" >  
            	<p:ajax event="rate" listener="#{ventaBean.onrate}" update="messages" />  
            	<p:ajax event="cancel" listener="#{ventaBean.oncancel}" update="messages" />  
        	</p:rating>
      		</h:panelGrid>     
        <p:commandButton value="Confirmar" action="#{ventaBean.valorar}" update="mensajes"/> 
</h:form>

<h:form id="venta">
<p:growl id="mensajes2" showDetail="true" life="2000" sticky="true" autoUpdate="true"/>
<p:commandButton value="Probar ingreso de venta" action="#{ventaBean.pruebaVenta}" update="mensajes2"/> 
</h:form>
</html>